<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GUnixCredentialsMessage</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GIO 参考手册">
<link rel="up" href="networking.html" title="Lowlevel network support">
<link rel="prev" href="gio-GCredentials.html" title="GCredentials">
<link rel="next" href="gio-GProxy.html" title="GProxy">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gio-GCredentials.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="networking.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GIO 参考手册</th>
<td><a accesskey="n" href="gio-GProxy.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gio-GUnixCredentialsMessage.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gio-GUnixCredentialsMessage.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gio-GUnixCredentialsMessage"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gio-GUnixCredentialsMessage.top_of_page"></a>GUnixCredentialsMessage</span></h2>
<p>GUnixCredentialsMessage — A GSocketControlMessage containing credentials</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gio-GUnixCredentialsMessage.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gio/gunixcredentialsmessage.h&gt;

                    <a class="link" href="gio-GUnixCredentialsMessage.html#GUnixCredentialsMessage" title="GUnixCredentialsMessage">GUnixCredentialsMessage</a>;
struct              <a class="link" href="gio-GUnixCredentialsMessage.html#GUnixCredentialsMessageClass" title="struct GUnixCredentialsMessageClass">GUnixCredentialsMessageClass</a>;
<a class="link" href="gio-GSocketControlMessage.html#GSocketControlMessage" title="GSocketControlMessage"><span class="returnvalue">GSocketControlMessage</span></a> * <a class="link" href="gio-GUnixCredentialsMessage.html#g-unix-credentials-message-new" title="g_unix_credentials_message_new ()">g_unix_credentials_message_new</a>  (<em class="parameter"><code><span class="type">void</span></code></em>);
<a class="link" href="gio-GSocketControlMessage.html#GSocketControlMessage" title="GSocketControlMessage"><span class="returnvalue">GSocketControlMessage</span></a> * <a class="link" href="gio-GUnixCredentialsMessage.html#g-unix-credentials-message-new-with-credentials" title="g_unix_credentials_message_new_with_credentials ()">g_unix_credentials_message_new_with_credentials</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GCredentials.html#GCredentials" title="GCredentials"><span class="type">GCredentials</span></a> *credentials</code></em>);
<a class="link" href="gio-GCredentials.html#GCredentials" title="GCredentials"><span class="returnvalue">GCredentials</span></a> *      <a class="link" href="gio-GUnixCredentialsMessage.html#g-unix-credentials-message-get-credentials" title="g_unix_credentials_message_get_credentials ()">g_unix_credentials_message_get_credentials</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GUnixCredentialsMessage.html#GUnixCredentialsMessage" title="GUnixCredentialsMessage"><span class="type">GUnixCredentialsMessage</span></a> *message</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gio-GUnixCredentialsMessage.html#g-unix-credentials-message-is-supported" title="g_unix_credentials_message_is_supported ()">g_unix_credentials_message_is_supported</a>
                                                        (<em class="parameter"><code><span class="type">void</span></code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gio-GUnixCredentialsMessage.description"></a><h2>Description</h2>
<p>
This <a class="link" href="gio-GSocketControlMessage.html#GSocketControlMessage" title="GSocketControlMessage"><span class="type">GSocketControlMessage</span></a> contains a <a class="link" href="gio-GCredentials.html#GCredentials" title="GCredentials"><span class="type">GCredentials</span></a> instance.  It
may be sent using <a class="link" href="gio-GSocket.html#g-socket-send-message" title="g_socket_send_message ()"><code class="function">g_socket_send_message()</code></a> and received using
<a class="link" href="gio-GSocket.html#g-socket-receive-message" title="g_socket_receive_message ()"><code class="function">g_socket_receive_message()</code></a> over UNIX sockets (ie: sockets in the
<a class="link" href="gio-GSocketAddress.html#G-SOCKET-FAMILY-UNIX:CAPS"><code class="literal">G_SOCKET_FAMILY_UNIX</code></a> family).
</p>
<p>
For an easier way to send and receive credentials over
stream-oriented UNIX sockets, see
<a class="link" href="gio-GUnixConnection.html#g-unix-connection-send-credentials" title="g_unix_connection_send_credentials ()"><code class="function">g_unix_connection_send_credentials()</code></a> and
<a class="link" href="gio-GUnixConnection.html#g-unix-connection-receive-credentials" title="g_unix_connection_receive_credentials ()"><code class="function">g_unix_connection_receive_credentials()</code></a>. To receive credentials of
a foreign process connected to a socket, use
<a class="link" href="gio-GSocket.html#g-socket-get-credentials" title="g_socket_get_credentials ()"><code class="function">g_socket_get_credentials()</code></a>.
</p>
</div>
<div class="refsect1">
<a name="gio-GUnixCredentialsMessage.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GUnixCredentialsMessage"></a><h3>GUnixCredentialsMessage</h3>
<pre class="programlisting">typedef struct _GUnixCredentialsMessage GUnixCredentialsMessage;</pre>
<p>
The <a class="link" href="gio-GUnixCredentialsMessage.html#GUnixCredentialsMessage" title="GUnixCredentialsMessage"><span class="type">GUnixCredentialsMessage</span></a> structure contains only private data
and should only be accessed using the provided API.
</p>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="GUnixCredentialsMessageClass"></a><h3>struct GUnixCredentialsMessageClass</h3>
<pre class="programlisting">struct GUnixCredentialsMessageClass {
  GSocketControlMessageClass parent_class;
};
</pre>
<p>
Class structure for <a class="link" href="gio-GUnixCredentialsMessage.html#GUnixCredentialsMessage" title="GUnixCredentialsMessage"><span class="type">GUnixCredentialsMessage</span></a>.
</p>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unix-credentials-message-new"></a><h3>g_unix_credentials_message_new ()</h3>
<pre class="programlisting"><a class="link" href="gio-GSocketControlMessage.html#GSocketControlMessage" title="GSocketControlMessage"><span class="returnvalue">GSocketControlMessage</span></a> * g_unix_credentials_message_new  (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Creates a new <a class="link" href="gio-GUnixCredentialsMessage.html#GUnixCredentialsMessage" title="GUnixCredentialsMessage"><span class="type">GUnixCredentialsMessage</span></a> with credentials matching the current processes.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="gio-GUnixCredentialsMessage.html#GUnixCredentialsMessage" title="GUnixCredentialsMessage"><span class="type">GUnixCredentialsMessage</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unix-credentials-message-new-with-credentials"></a><h3>g_unix_credentials_message_new_with_credentials ()</h3>
<pre class="programlisting"><a class="link" href="gio-GSocketControlMessage.html#GSocketControlMessage" title="GSocketControlMessage"><span class="returnvalue">GSocketControlMessage</span></a> * g_unix_credentials_message_new_with_credentials
                                                        (<em class="parameter"><code><a class="link" href="gio-GCredentials.html#GCredentials" title="GCredentials"><span class="type">GCredentials</span></a> *credentials</code></em>);</pre>
<p>
Creates a new <a class="link" href="gio-GUnixCredentialsMessage.html#GUnixCredentialsMessage" title="GUnixCredentialsMessage"><span class="type">GUnixCredentialsMessage</span></a> holding <em class="parameter"><code>credentials</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>credentials</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GCredentials.html#GCredentials" title="GCredentials"><span class="type">GCredentials</span></a> object.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="gio-GUnixCredentialsMessage.html#GUnixCredentialsMessage" title="GUnixCredentialsMessage"><span class="type">GUnixCredentialsMessage</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unix-credentials-message-get-credentials"></a><h3>g_unix_credentials_message_get_credentials ()</h3>
<pre class="programlisting"><a class="link" href="gio-GCredentials.html#GCredentials" title="GCredentials"><span class="returnvalue">GCredentials</span></a> *      g_unix_credentials_message_get_credentials
                                                        (<em class="parameter"><code><a class="link" href="gio-GUnixCredentialsMessage.html#GUnixCredentialsMessage" title="GUnixCredentialsMessage"><span class="type">GUnixCredentialsMessage</span></a> *message</code></em>);</pre>
<p>
Gets the credentials stored in <em class="parameter"><code>message</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GUnixCredentialsMessage.html#GUnixCredentialsMessage" title="GUnixCredentialsMessage"><span class="type">GUnixCredentialsMessage</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="gio-GCredentials.html#GCredentials" title="GCredentials"><span class="type">GCredentials</span></a> instance. Do not free, it is owned by <em class="parameter"><code>message</code></em>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unix-credentials-message-is-supported"></a><h3>g_unix_credentials_message_is_supported ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_unix_credentials_message_is_supported
                                                        (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Checks if passing a <span class="type">GCredential</span> on a <a class="link" href="gio-GSocket.html#GSocket" title="GSocket"><span class="type">GSocket</span></a> is supported on this platform.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if supported, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
</div>
<div class="refsect1">
<a name="gio-GUnixCredentialsMessage.see-also"></a><h2>See Also</h2>
<a class="link" href="gio-GUnixConnection.html#GUnixConnection" title="GUnixConnection"><span class="type">GUnixConnection</span></a>, <a class="link" href="gio-GSocketControlMessage.html#GSocketControlMessage" title="GSocketControlMessage"><span class="type">GSocketControlMessage</span></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.17</div>
</body>
</html>